﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using SharedGenomics.Workbench.Core;

namespace SharedGenomics.Workbench.Views.WindowsForms
{
    public class MenuBarView : MenuStrip, IMenu
    {
        public void AddItem(IMenuItem item)
        {
            this.Items.Add((ToolStripItem)item);
        }

        #region IEnumerable<IMenuItem> Members

        public IEnumerator<IMenuItem> GetEnumerator()
        {
            return this.Items.OfType<IMenuItem>().GetEnumerator();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return this.GetEnumerator();
        }

        #endregion
    }
}
